In order to understand this node, you need to read my writeup in
for(int *p=0;;*(p++)=0);
This node is something of a follow-up. The two nodes were separated in order that this node could be independently searched for.
Note that when The Loop linked to above is run on a machine running a Microsoft operating system based on the Windows 9x kernel, it will give you something along the lines of "general protection fault" or "This program has performed an illegal operation and has been shut down". Many windows users take such messages to mean that Windows is an OS with full protected memory. They are mistaken. Windows 9x has a form of memory protection, but it does not have true protected memory.
In a true protected memory system, such as any *n?x system or Windows NT, each program is given its own memory space, and is not able to touch or in any way access anything outside that space. This gives a great deal of security; it also means the entire system is more stable, because it means if a program crashes, only that program crashes-- the others are unaffected. Windows 9x, however, does not have true protected memory even though it does have a form of memory protection because it is still possible for one single program to crash the entire operating system and all other programs. The thing is, there are protected spaces within memory-- but there are also spaces which are not protected at all. The for(int *p=0;;*(p++)=0); loop will be caught by the Win9x pseudoprotected memory, because it begins at address zero, and address zero is one of the addresses Win9x attempts to trap you at.
So, all you have to do is start somewhere else.
void main() {for(int *p=(int *)0x00010000;;*(p++)=0);}
Try running the bit of code above.
Still believe windows has protected memory..?
Above code contributed by Phillip, this guy i know, who saw my original Loop and decided to try to find an address windows left unprotected. His tests on Windows 98 boxen have produced varying results, ranging from the machine simply shutting off to a BSOD followed by the monitor reporting it was no longer receiving signal from the computer. In no case did the computer in question continue to do anything that could remotely be called "function", including response to mouse events.
See also The quickest way to crash Windows NT/2000/XP